package com.bdk.middle.goods.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.goods.api.domain.SkuDO;
import com.bdk.middle.goods.api.query.SkuQueryDO;
import com.bdk.middle.goods.core.entity.SkuEntity;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Reagan
 * @since 2021-03-18
 */
public interface SkuService extends IService<SkuEntity> {

    /**
     * 添加SKU
     * @param domain SKUDO
     * @return ResultDO
     */
    public ResultDO add(SkuDO domain);

    /**
     * 修改SKU信息
     * @param domain SKUDO
     * @return ResultDO
     */
    public ResultDO edit(SkuDO domain);

    /**
     * 获取SKU详情
     * @param id SKUID
     * @return ResultDO
     */
    public ResultDO get(String id);

    /**
     * 删除SKU
     * @param id SKUID
     * @param modifier 修改人SKU名
     * @return ResultDO
     */
    public ResultDO remove(String id, String modifier);

    /**
     * 删除SKU
     * @param goodsId 商品ID
     * @param modifier 修改人SKU名
     * @return ResultDO
     */
    public ResultDO removeByGoodsId(String goodsId, String modifier);

    /**
     * 根据商品ID返回SKU
     * @param goodsId 商品ID
     * @return ResultDO
     */
    public ResultDO listByGoodsId(String goodsId);

    /**
     * 查找SKU列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    public ResultDO find(SkuQueryDO domain);
}
